<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
// 打印n以下的质数
        let n = 50
        
for(let i=2; i<n; i++){
    let num=true
    for(let y=2; y<i; y++){
        console.log(y+"这是y")
        if(i%y==0){
            num=false
        }
    }
    if(num){
        // console.log(i)
    }
}
    </script>
</body>
</html>